package com.thunisoft.builder.one;

/**
 * 描述： 指挥者
 * 作者： Administrator
 * 时间： 2017年12月6日下午11:14:28
 * 版本： 1.0
 */
public class Director {

    private  Builder builder;
    public  Director(Builder builder) {
           this.builder=builder;
    }

    public  void setBuilder(Builder builder) {
           this.builder=builder;
    }

  //产品构建与组装方法
    public Product construct() {
           builder.buildPartA();
           builder.buildPartB();
           builder.buildPartC();
           return builder.getResult();
    }
}
